<?php
	require_once(realpath(dirname(__FILE__)) . "/Baseobj.class.php");

	class Contenuassoc extends Baseobj{

		var $id;
		var $objet;
		var $type;
		var $contenu;
		var $classement;


		const TABLE="contenuassoc";
		var $table=self::TABLE;

		var $bddvars=array("id", "objet", "type", "contenu", "classement");

		function __construct($id = 0){
			parent::__construct();

			if($id > 0)
 			  $this->charger($id);
		}


		function charger($id){
			return $this->getVars("select * from $this->table where id=\"$id\"");
		}


		function existe($objet, $type, $contenu){

			return $this->getVars("select * from $this->table where objet=\"$objet\" and type=\"$type\" and contenu=\"$contenu\"");

		}


	}


?>